home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Languguage OS 2
/
Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO
/
language
/
embedded
/
mcu
/
macros05.arc
/
EXAMPLE.S
next >
Wrap
Text File
|
1990-05-16
|
980b
|
39 lines
ORG $50 ! Data segment MUST start at low memory!
TOTAL RMB 2
RTABLE RMB 5
INCLUDE MACROS05.MAC
*
ORG $400 ! Start code segment.
RESET RSP
MOVE #,.RAMSBR$,#,RAMSBR$,#,RAMSZ$ ! Init ram.
START EQU *
* <<replace example instruction code below with YOUR program>>
MOV.W #,0,TOTAL
LDD COST
ADDD #,1000
SUBD #,ADJUST
ADDD TOTAL
STDD TOTAL
CPD #,1500
BEQ MATCH
*
LDXR #,0
LDYR #,0
LOOP LDAXY TABLE,XREG
STAXY RTABLE,YREG
INCXR
INCYR
CPY #,5
BNE LOOP
*
* <<place rest of instruction code here>>
*
INCLUDE RAMSBR.INI
TABLE FCB 1,2,3,4,5
ADJUST FDB 150
COST FDB 859
*
* <<place rest of data constants here>>
*
END